package com.sk.commonadapter_android.adapter;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.view.ViewGroup;

import java.util.List;

/**
 * @Author yemao
 * @Email yrmao9893@163.com
 * @Date 2017/7/10
 * @Des null!
 */

public abstract class GroupAdapter<DATA> extends CommonRecyclerViewAdapter<DATA> {
    private int mChildLayoutId;
    public GroupAdapter(Context mContext, @LayoutRes int mLayoutId,@LayoutRes int mChildLayoutId){
        this(mContext,mLayoutId);
        this.mChildLayoutId=mChildLayoutId;
    }
    public GroupAdapter(Context mContext, @LayoutRes int mLayoutId) {
        super(mContext, mLayoutId);
    }

    public GroupAdapter(Context mContext, @LayoutRes int mLayoutId, List<DATA> mData) {
        super(mContext, mLayoutId, mData);
    }

    @Override
    public CommonViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return super.onCreateViewHolder(parent, viewType);
    }

    @Override
    public void convert(CommonViewHolder holder, DATA item, int position) {

    }

    abstract int getGroupCount();
    abstract int getChildCount(int groupPosition);
    abstract Object getGroup();
    abstract Object getChild(int groupPosition);
}
